package part1;

public class Main {
    public static void main(String[] args) {
        PurchaseRequest purchaseRequest = new PurchaseRequest(1, 31000, 1);

        Department department = new Department("张主任");
        College college = new College("李院长");
        Viceprincipal viceprincipal = new Viceprincipal("王副校长");
        Principal principal = new Principal("李校长");

        department.setApprover(college);
        college.setApprover(viceprincipal);
        viceprincipal.setApprover(principal);
        // 构成闭环
        // 这样子可以方便if语句过长，比如你感觉这个api的请求金额都比较大，那就直接从校长开始判断就快多了
        // 但是一定要避免死循环
        principal.setApprover(department);

        department.processRequest(purchaseRequest);
    }
}
